/* ============================================
   AFFILIATE MONETIZATION COMPONENTS
   TheDispatcher - Amazon Associates Integration
   Matching brand colors: #0E3B2D, #39A078
   ============================================ */

/* ============================================
   GLOBAL AFFILIATE STYLES
   ============================================ */

.affiliate-disclosure-banner {
    background: rgba(57, 160, 120, 0.1);
    border-left: 4px solid var(--accent-green);
    padding: 1.2rem 1.5rem;
    margin-bottom: 2.5rem;
    border-radius: 8px;
    animation: fadeIn 0.5s ease;
}

.affiliate-disclosure-banner p {
    font-size: 0.95rem;
    color: var(--text-body);
    margin: 0;
    line-height: 1.6;
}

.affiliate-disclosure-banner strong {
    color: var(--text-heading);
    font-weight: 600;
}

/* ============================================
   AFFILIATE PRODUCT CARD
   ============================================ */

.affiliate-card {
    background: var(--bg-section);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.affiliate-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #39A078, #C9A961);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.affiliate-card:hover::before {
    transform: scaleX(1);
}

.affiliate-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-green);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.affiliate-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: var(--accent-gold);
    color: var(--bg-primary);
    padding: 0.4rem 0.9rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 2;
}

.affiliate-badge.best-seller {
    background: var(--accent-gold);
}

.affiliate-badge.budget-pick {
    background: #39A078;
    color: white;
}

.affiliate-badge.premium {
    background: #C43F3F;
    color: white;
}

.affiliate-image-wrapper {
    width: 100%;
    aspect-ratio: 1/1;
    margin-bottom: 1.5rem;
    border-radius: 10px;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
}

.affiliate-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}

.affiliate-card:hover .affiliate-image-wrapper img {
    transform: scale(1.05);
}

.affiliate-title {
    font-size: 1.3rem;
    color: var(--text-heading);
    margin-bottom: 0.8rem;
    font-weight: 600;
    line-height: 1.3;
    min-height: 2.6rem;
}

.affiliate-description {
    font-size: 0.95rem;
    color: var(--text-body);
    margin-bottom: 1rem;
    line-height: 1.6;
    flex-grow: 1;
}

.affiliate-specs {
    list-style: none;
    margin-bottom: 1.5rem;
    padding-left: 0;
}

.affiliate-specs li {
    font-size: 0.9rem;
    color: var(--text-body);
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
}

.affiliate-specs li:last-child {
    border-bottom: none;
}

.affiliate-specs li::before {
    content: '✓';
    color: var(--accent-green);
    font-weight: bold;
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

.affiliate-cta {
    display: inline-block;
    width: 100%;
    text-align: center;
    background: linear-gradient(135deg, #39A078, #2d8060);
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s ease;
    margin-bottom: 0.8rem;
    font-size: 1rem;
}

.affiliate-cta:hover {
    background: linear-gradient(135deg, #2d8060, #39A078);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(57, 160, 120, 0.4);
}

.affiliate-disclosure-micro {
    font-size: 0.75rem;
    color: var(--text-body);
    opacity: 0.7;
    text-align: center;
    margin: 0;
    font-style: italic;
}

/* ============================================
   TOP PICKS STRIP (Homepage)
   ============================================ */

.affiliate-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .affiliate-strip {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ============================================
   SIDEBAR WIDGET (Directory & Blog)
   ============================================ */

.affiliate-sidebar-widget {
    background: var(--bg-section);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 1.5rem;
    position: sticky;
    top: 100px;
    margin-bottom: 2rem;
}

.widget-title {
    font-size: 1.3rem;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.widget-disclosure {
    font-size: 0.75rem;
    color: var(--text-body);
    opacity: 0.7;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    font-style: italic;
}

.affiliate-widget-items {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.affiliate-widget-item {
    display: flex;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
    transition: background 0.2s ease;
    border-radius: 8px;
}

.affiliate-widget-item:last-child {
    border-bottom: none;
}

.affiliate-widget-item:hover {
    background: rgba(57, 160, 120, 0.05);
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.affiliate-widget-item img {
    width: 80px;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
}

.widget-item-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}

.widget-item-content h4 {
    font-size: 0.95rem;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
    line-height: 1.3;
    font-weight: 600;
}

.widget-cta {
    font-size: 0.85rem;
    color: var(--accent-green);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

.widget-cta:hover {
    color: var(--accent-gold);
}

.widget-cta::after {
    content: '→';
    font-size: 1rem;
}

/* ============================================
   INLINE BLOG MENTION
   ============================================ */

.affiliate-inline-link {
    color: var(--accent-green);
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    font-weight: 500;
    transition: color 0.2s ease;
    position: relative;
}

.affiliate-inline-link:hover {
    color: var(--accent-gold);
    text-decoration-style: solid;
}

.affiliate-inline-link::after {
    content: '🔗';
    font-size: 0.85em;
    margin-left: 0.2rem;
    opacity: 0.7;
}

/* ============================================
   IN-ARTICLE PRODUCT BLOCK
   ============================================ */

.affiliate-article-block {
    background: rgba(57, 160, 120, 0.05);
    border: 2px solid var(--border-color);
    border-radius: 15px;
    padding: 2rem;
    margin: 3rem 0;
    position: relative;
}

.affiliate-article-block::before {
    content: 'RECOMMENDED PRODUCTS';
    position: absolute;
    top: -12px;
    left: 20px;
    background: var(--bg-primary);
    color: var(--accent-green);
    padding: 0.3rem 1rem;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 1px;
    border-radius: 20px;
    border: 2px solid var(--border-color);
}

.affiliate-article-block h3 {
    font-size: 1.8rem;
    color: var(--text-heading);
    margin-bottom: 1.5rem;
    text-align: center;
}

.affiliate-article-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-top: 1.5rem;
}

.affiliate-article-disclosure {
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-body);
    opacity: 0.8;
    margin-top: 1.5rem;
    font-style: italic;
}

/* ============================================
   DEALS / EVENT BLOCK
   ============================================ */

.affiliate-deals-block {
    background: linear-gradient(135deg, rgba(57, 160, 120, 0.1), rgba(201, 169, 97, 0.1));
    border: 3px solid var(--accent-gold);
    border-radius: 15px;
    padding: 2.5rem;
    margin: 3rem 0;
    position: relative;
    overflow: hidden;
}

.affiliate-deals-block::before {
    content: '🎉';
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 3rem;
    opacity: 0.2;
}

.deals-header {
    text-align: center;
    margin-bottom: 2rem;
}

.deals-badge {
    display: inline-block;
    background: var(--accent-gold);
    color: var(--bg-primary);
    padding: 0.5rem 1.5rem;
    border-radius: 25px;
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1rem;
}

.deals-title {
    font-size: 2.2rem;
    color: var(--text-heading);
    margin-bottom: 0.5rem;
}

.deals-subtitle {
    font-size: 1.1rem;
    color: var(--text-body);
    margin-bottom: 1rem;
}

.deals-timer {
    font-size: 1rem;
    color: var(--accent-red);
    font-weight: 600;
}

.deals-products {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

/* ============================================
   AUDIENCE FILTERS (Gear Hub)
   ============================================ */

.audience-filters {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.audience-filter-btn {
    background: var(--bg-section);
    border: 2px solid var(--border-color);
    color: var(--text-body);
    padding: 0.8rem 1.5rem;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.audience-filter-btn:hover {
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.audience-filter-btn.active {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: white;
}

/* ============================================
   CATEGORY TABS (Gear Hub)
   ============================================ */

.category-tabs {
    display: flex;
    gap: 1rem;
    border-bottom: 2px solid var(--border-color);
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
}

.category-tab {
    background: transparent;
    border: none;
    color: var(--text-body);
    padding: 1rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    position: relative;
    transition: color 0.3s ease;
    font-size: 1rem;
}

.category-tab::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-green);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.category-tab:hover {
    color: var(--accent-green);
}

.category-tab.active {
    color: var(--text-heading);
}

.category-tab.active::after {
    transform: scaleX(1);
}

/* ============================================
   PRODUCT GRID (Gear Hub)
   ============================================ */

.products-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2.5rem;
}

@media (max-width: 1024px) {
    .products-grid {
        grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .products-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

/* ============================================
   ANIMATIONS
   ============================================ */

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(-20px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.affiliate-card {
    animation: fadeIn 0.5s ease;
}

/* ============================================
   MOBILE RESPONSIVENESS
   ============================================ */

@media (max-width: 768px) {
    .affiliate-sidebar-widget {
        position: static;
        margin-top: 2rem;
    }

    .affiliate-article-products {
        grid-template-columns: 1fr;
    }

    .audience-filters {
        gap: 0.5rem;
    }

    .audience-filter-btn {
        padding: 0.6rem 1rem;
        font-size: 0.85rem;
    }

    .category-tabs {
        overflow-x: auto;
        flex-wrap: nowrap;
        -webkit-overflow-scrolling: touch;
    }

    .category-tab {
        white-space: nowrap;
        padding: 0.8rem 1rem;
    }
}

/* ============================================
   ACCESSIBILITY
   ============================================ */

.affiliate-cta:focus,
.widget-cta:focus,
.affiliate-inline-link:focus {
    outline: 2px solid var(--accent-green);
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}
